@import '../../../assets/style/default';

.loading-box{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
}

//line-scale   loading效果
@keyframes line-scale {
  0% {
    -webkit-transform: scaley(1);
    transform: scaley(1);
  }

  50% {
    -webkit-transform: scaley(0.4);
    transform: scaley(0.4);
  }

  100% {
    -webkit-transform: scaley(1);
    transform: scaley(1);
  }
}

.line-scale {
  width: 45px;
  & > div {
    background-color: @base-color;
    width: 4px;
    height: 30px;
    border-radius: 2px;
    margin: 2px;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    display: inline-block;
  }
  & > div:nth-child(1) {
    -webkit-animation: line-scale 1s 0.1s infinite cubic-bezier(.2, .68, .18, 1.08);
    animation: line-scale 1s 0.1s infinite cubic-bezier(.2, .68, .18, 1.08);
  }

  & > div:nth-child(2) {
    -webkit-animation: line-scale 1s 0.2s infinite cubic-bezier(.2, .68, .18, 1.08);
    animation: line-scale 1s 0.2s infinite cubic-bezier(.2, .68, .18, 1.08);
  }

  & > div:nth-child(3) {
    -webkit-animation: line-scale 1s 0.3s infinite cubic-bezier(.2, .68, .18, 1.08);
    animation: line-scale 1s 0.3s infinite cubic-bezier(.2, .68, .18, 1.08);
  }

  & > div:nth-child(4) {
    -webkit-animation: line-scale 1s 0.4s infinite cubic-bezier(.2, .68, .18, 1.08);
    animation: line-scale 1s 0.4s infinite cubic-bezier(.2, .68, .18, 1.08);
  }

  & > div:nth-child(5) {
    -webkit-animation: line-scale 1s 0.5s infinite cubic-bezier(.2, .68, .18, 1.08);
    animation: line-scale 1s 0.5s infinite cubic-bezier(.2, .68, .18, 1.08);
  }
}

//ball-clip-rotate-multiple  loading效果
@keyframes rotate {
  0% {
    -webkit-transform: rotate(0deg) scale(1);
    transform: rotate(0deg) scale(1);
  }

  50% {
    -webkit-transform: rotate(180deg) scale(0.6);
    transform: rotate(180deg) scale(0.6);
  }

  100% {
    -webkit-transform: rotate(360deg) scale(1);
    transform: rotate(360deg) scale(1);
  }
}

.ball-clip-rotate-multiple {
  position: relative;
  width: 40px;
  height: 40px;

  & > div {
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    position: absolute;
    left: 0;
    top: 0;
    border: 2px solid @base-color;
    border-bottom-color: transparent;
    border-top-color: transparent;
    border-radius: 100%;
    height: 35px;
    width: 35px;
    -webkit-animation: rotate 1s 0s ease-in-out infinite;
    animation: rotate 1s 0s ease-in-out infinite;
  }
  & > div:last-child {
    display: inline-block;
    top: 10px;
    left: 10px;
    width: 15px;
    height: 15px;
    -webkit-animation-duration: 0.5s;
    animation-duration: 0.5s;
    border-color: @base-color transparent @base-color transparent;
    -webkit-animation-direction: reverse;
    animation-direction: reverse;
  }
}

//ball-clip-rotate-pulse  loading效果
@keyframes scale {
  30% {
    -webkit-transform: scale(0.3);
    transform: scale(0.3);
  }

  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

.ball-clip-rotate-pulse {
  position: relative;
  width: 35px;
  height: 35px;

  & > div {
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 100%;
  }
  & > div:first-child {
    background: @base-color;
    height: 16px;
    width: 16px;
    top: 9px;
    left: 9px;
    -webkit-animation: scale 1s 0s cubic-bezier(.09, .57, .49, .9) infinite;
    animation: scale 1s 0s cubic-bezier(.09, .57, .49, .9) infinite;
  }
  & > div:last-child {
    position: absolute;
    border: 2px solid @base-color;
    width: 30px;
    height: 30px;
    background: transparent;
    border-color: @base-color transparent @base-color transparent;
    -webkit-animation: rotate 1s 0s cubic-bezier(.09, .57, .49, .9) infinite;
    animation: rotate 1s 0s cubic-bezier(.09, .57, .49, .9) infinite;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
  }
}

//square-spin loading效果
@keyframes square-spin {
  25% {
    -webkit-transform: perspective(100px) rotateX(180deg) rotateY(0);
    transform: perspective(100px) rotateX(180deg) rotateY(0);
  }

  50% {
    -webkit-transform: perspective(100px) rotateX(180deg) rotateY(180deg);
    transform: perspective(100px) rotateX(180deg) rotateY(180deg);
  }

  75% {
    -webkit-transform: perspective(100px) rotateX(0) rotateY(180deg);
    transform: perspective(100px) rotateX(0) rotateY(180deg);
  }

  100% {
    -webkit-transform: perspective(100px) rotateX(0) rotateY(0);
    transform: perspective(100px) rotateX(0) rotateY(0);
  }
}

.square-spin {
  width: 35px;
  height: 35px;
  & > div {
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    width: 35px;
    height: 35px;
    background: @base-color;
    border: 1px solid @base-color;
    -webkit-animation: square-spin 3s 0s cubic-bezier(.09, .57, .49, .9) infinite;
    animation: square-spin 3s 0s cubic-bezier(.09, .57, .49, .9) infinite;
  }
}

//ball-scale  loading效果
@keyframes ball-scale {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
  }

  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
    opacity: 0;
  }
}

.ball-scale {
  width: 40px;
  height: 40px;
  & > div {
    background-color: @base-color;
    border-radius: 100%;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    display: inline-block;
    height: 40px;
    width: 40px;
    -webkit-animation: ball-scale 1s 0s ease-in-out infinite;
    animation: ball-scale 1s 0s ease-in-out infinite;
  }
}

//ball-scale-multiple   loading效果
@keyframes ball-scale-multiple {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

  100% {
    -webkit-transform: scale(1);
    transform: scale(1);
    opacity: 0;
  }
}

.ball-scale-multiple {
  position: relative;
  height: 40px;
  width: 40px;
  & > div {
    display: inline-block;
    background-color: @base-color;
    border-radius: 100%;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    margin: 0;
    width: 40px;
    height: 40px;
    -webkit-animation: ball-scale-multiple 1s 0s linear infinite;
    animation: ball-scale-multiple 1s 0s linear infinite;
  }
  & > div:nth-child(2) {
    -webkit-animation-delay: 0.2s;
    animation-delay: 0.2s;
  }
  & > div:nth-child(3) {
    -webkit-animation-delay: 0.4s;
    animation-delay: 0.4s;
  }
}




